Repetitive column-wide multiplication and division in Python